package com.zg.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zg.dao.CategorizeMapper;
import com.zg.pojo.Categorize;
import com.zg.service.CategorizeService;

@Service("categorizeService")
public class CategorizeServiceImpl implements CategorizeService {

	@Resource
	private CategorizeMapper  categorizeDao;
	/**
	 * 查
	 */
	@Override
	public Categorize getCategorizeById(int categorizeId) {
		return this.categorizeDao.selectByPrimaryKey(categorizeId);
	}

	/**
	 * 增
	 */
	@Override
	public int insert(Categorize record) {
		return this.categorizeDao.insert(record);
	}

	/**
	 * 改
	 */
	@Override
	public int updateByPrimaryKeySelective(Categorize newCategorize) {
		return this.categorizeDao.updateByPrimaryKeySelective(newCategorize);
	}

	/**
	 * 删
	 */
	@Override
	public int deleteByPrimaryKey(int id) {
		return this.deleteByPrimaryKey(id);
	}

	@Override
	public List<Categorize> getAllCategorize() {
		return this.categorizeDao.selectAll();
	}

}
